package com.example.demo.service.impl;

import com.example.demo.domain.Leave;
import com.example.demo.domain.Vo.LeaveVo;
import com.example.demo.mapper.LeaveMapper;
import com.example.demo.service.ILeaveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LeaveServiceImpl implements ILeaveService {

    @Autowired
    public LeaveMapper leaveMapper;

    /**
     * 查询用户
     * @param leave
     * @return
     */
    @Override
    public List<LeaveVo> selectLeave(Leave leave) {
        return leaveMapper.selectLeave(leave);
    }

    /**
     * 增加角色
     * @param leave
     */
    @Override
    public void insertLeave(Leave leave) {
        leaveMapper.insertLeave(leave);
    }

    /**
     * 修改请假申请
     * @param leave
     */
    @Override
    public void updateLeaveById(Leave leave) {
        leaveMapper.updateLeaveById(leave);
    }

    /**
     * 删除请假申请
     * @param leaveId
     */
    @Override
    public void delLeaveById(long leaveId) {
        leaveMapper.delLeaveById(leaveId);
    }


}
